
/* shooting_game/frontend/style.css */
@import url('https://fonts.loli.net/css?family=Press+Start+2P');

/* 基础样式 */
body {
  font-family: 'Press Start 2P', cursive;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  color: white;
  overflow: hidden;
  height: 100vh;
  margin: 0;
}

/* 游戏画布样式 */
canvas {
  display: block;
  margin: 0 auto;
  background-color: #000;
  border: 4px solid #4a00e0;
  box-shadow: 0 0 20px rgba(74, 0, 224, 0.6);
}

/* 粒子背景 */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* 游戏标题 */
.game-title {
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.8; }
  50% { opacity: 1; }
  100% { opacity: 0.8; }
}

/* 武器按钮 */
.weapon-btn {
  transition: all 0.3s;
  border: 2px solid transparent;
}

.weapon-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

.weapon-btn.active {
  background: linear-gradient(45deg, #ff00cc, #3333ff);
  box-shadow: 0 0 20px rgba(255, 0, 204, 0.8);
  border-color: white;
}

/* 游戏控制按钮 */
.control-btn {
  transition: all 0.2s;
}

.control-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 分数显示 */
.score-display {
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.5);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
}

/* 血条样式 */
.health-bar {
  height: 5px;
  background: linear-gradient(to right, #ff0000, #00ff00);
  transition: width 0.3s;
}

/* 关卡提示 */
.level-up-message {
  animation: zoomInOut 1.5s ease-out;
}

@keyframes zoomInOut {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}

/* 游戏提示 */
.game-tip {
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* 响应式调整 */
@media (max-width: 768px) {
  canvas {
    width: 100%;
    height: auto;
  }
  
  .weapon-btn {
    padding: 0.5rem;
    font-size: 0.8rem;
  }
}
